package com.example.warehouse.bus.dao.persist.repository;

import com.example.warehouse.bus.pojo.entity.BusSales;
import com.example.warehouse.bus.pojo.param.BusSalesAddNewParam;
import com.example.warehouse.bus.pojo.param.BusSalesSelectParam;
import com.example.warehouse.bus.pojo.param.BusSalesUpdateParam;
import com.example.warehouse.bus.pojo.vo.BusSalesAndSalesbackSelectCNVO;
import com.example.warehouse.bus.pojo.vo.BusSalesAndSalesbackSelectGNVO;
import com.example.warehouse.bus.pojo.vo.BusSalesSelectVO;

import java.time.LocalDate;
import java.util.List;

/**
 * 销售订单_数据层_接口
 */
public interface IBusSalesRepository {

    /**
     * 添加_销售订单
     *
     * @param busSalesAddNewParam
     * @param idpipo
     * @return
     */
    int instert(BusSalesAddNewParam busSalesAddNewParam, Long idpipo);

    /**
     * 逻辑删除_销售订单
     *
     * @param id
     * @param idpipo
     * @return
     */
    int deleteById(Long id, Long idpipo);

    /**
     * 任意项修改_销售订单
     *
     * @param busSalesUpdateParam
     * @param idpipo
     * @return
     */
    int update(BusSalesUpdateParam busSalesUpdateParam, Long idpipo);

    /**
     * 审批_销售订单
     *
     * @param id
     * @param approval
     * @param idpipo
     * @return
     */
    int approvalSales(Long id, Integer approval, Long idpipo);

    /**
     * 分页模糊查询_销售订单_结果总数量
     *
     * @param busSalesSelectParam
     * @param begin
     * @param end
     * @return
     */
    Long count(BusSalesSelectParam busSalesSelectParam, LocalDate begin, LocalDate end);

    /**
     * 分页模糊查询_销售订单_结果当前页面列表
     *
     * @param busSalesSelectParam
     * @param start
     * @param pageSize
     * @param begin
     * @param end
     * @return
     */
    List<BusSalesSelectVO> list(BusSalesSelectParam busSalesSelectParam, Integer start, Integer pageSize, LocalDate begin, LocalDate end);

    /**
     * 下拉选查询_客户名称
     *
     * @return
     */
    List<BusSalesAndSalesbackSelectCNVO> listCustomerName();

    /**
     * 下拉选查询_商品名称
     *
     * @return
     */
    List<BusSalesAndSalesbackSelectGNVO> listGoodsName();

    List<BusSales> selectAll();
}
